<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>加长</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            background-color: orange;
            transition: width 5s;
        }
        div:hover{
            width: 500px;
            text-align: right;
        }
    </style>
</head>
<body>
<div>哈喽啊</div>
</body>
</html>